<?php

declare(strict_types=1);

namespace app\common\service\crm;

use app\common\traits\ServiceTrait;
use app\common\dao\crm\ReceivablesPlanDao;

/**
 * 回款计划表 服务业务层(Service)
 * @author 吕玉冰
 * @date  2022-07-28
 * @copyright ©2022 泉州市盛筑信息科技有限公司 版权所有
 */
class ReceivablesPlanService
{
    protected $dao = null;

    public function __construct()
    {
        $this->dao = new ReceivablesPlanDao();
    }

    use ServiceTrait;

    public function _list_where($data)
    {
        $where = [];
        if (isset($data['contract_id']) && $data['contract_id'] != 0) {
            $where[] = ['contract_id', '=', $data['contract_id']];
        }
        $data['where'] = $where;
        return [
            'where' => isset($data['where']) ? $data['where'] : [],
            'order' => isset($data['order']) ? $data['order'] : [],
            'field' => isset($data['field']) ? $data['field'] : ['*'],
        ];
    }


}
    